<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            height: 100%;
        }
        .big{
            display: flex;
            /*
            flex-direction: row;
            flex-wrap: wrap-reverse;*/
            flex-flow: row wrap;
            justify-content:space-around;  /*水平对齐方式*/
            align-items: flex-start;/*垂直对齐方式*/
            height: 400px;
            background-color: rgb(194, 91, 17);
        }
        .item{
            background-color: red;
            margin: 10px;
            width: 100px;
            font-size: 64px;
            /* height: 100px; */
        }
        .box{
            display: flex;
            height: 100%;
            justify-content: center;
            align-items: center;
            background-color: red;
        }
        .box-center{
            width: 200px;
            height: 200px;
            background-color: yellow;
        }
        .box2{
            margin-top: 30px;
            width: 100%;
            height: 400px;
            background-color: red;
        }
        .box-center2{
            width: 200px;
            height: 200px;
            float: left;
            margin-left: 44.5%;
            margin-top: 100px;
            background-color: yellow;
        }
        #box{
            display: flex;
            flex-direction: column;
            width: 100%;
            height: 100%;
        }
        #top{
            height: 300px;
            width: 100%;
            background-color: whitesmoke;
        }
        #border-top{
            display: flex;
            height: 100%;
            background-color: black;
            color: white;
        }
        #left1{
            height: 75%;
            flex-grow:1;
            margin: 10px;
            background-color: saddlebrown;
        }
        #left2{
            height: 75%;
            flex-grow:1;
            margin: 10px;
            background-color: saddlebrown;
        }
        #centers{
            height: 95%;
            flex-grow:2;
            margin: 10px;
            background-color: white;
        }
        #right{
            height: 75%;
            flex-grow:1;
            margin: 10px;
            background-color: #666;
        }  
    </style>
</head>
<body>
    <div class="big"><!--order调整排列顺序,默认为0  flex-grow生长空间   用来自适应占几份 flex-shrink等比例缩小-->
        <div  class="item">A</div>
        <div style="align-self: flex-end;" class="item">B</div>
        <div class="item">C</div>
        <div class="item">C</div>
    </div>
    <!-- flex布局遮罩层 -->
    <div class="box">
        <div class="box-center">Flex遮罩层</div>
    </div>
    <!-- 浮动遮罩层 -->
    <!--
    <div class="box2">
        <div class="box-center2">浮动遮罩层</div>
    </div>
    -->

    <!-- flex布局测试 -->
    <div id="box">
        <div id="top">最上边</div>
        <div id="border-top">
            <div style="flex-grow: 0.2;"></div>
            <div id="left1"></div>
            <div style="flex-grow: 0.1;"></div>
            <div id="left2"></div>
            <div style="flex-grow: 0.1;"></div>
            <div id="centers"></div>
            <div style="flex-grow: 0.1;"></div>
            <div id="right"></div>
            <div style="flex-grow: 0.2;"></div>
        </div>
    </div>
</body>
</html>